#define  _CRT_SECURE_NO_WARNINGS

#include "UnorderedMap.h"
#include "UnorderedSet.h"

void test1()
{
	yjz::unordered_set<int> st;
	int a[] = { 4,2,6,1,3,5,15,7,16,14 };
	for (auto e : a)
	{
		st.insert(e);
	}

	for (auto e : st)
	{
		cout << e << " ";
	}
	cout << endl;

	yjz::unordered_set<int>::iterator it = st.begin();
	while (it != st.end())
	{
		cout << *it << " ";
		++it;
	}
	cout << endl;

	yjz::Print(st);
}

void test3()
{
	struct Date
	{
		int _year;
		int _month;
		int _day;

		bool operator==(const Date& d) const
		{
			return _year == d._year
				&& _month == d._month
				&& _day == d._day;
		}
	};

	struct HashDate
	{
		size_t operator()(const Date& d)
		{
			return (d._year * 31 + d._month) * 31 + d._day;
		}
	};

	yjz::unordered_set<Date, HashDate> us;
	us.insert({ 2024,10,18 });
}

int main()
{
	test3();
	return 0;
}